package com.hk.label;

import java.awt.Color;
import java.awt.Font;

import javax.swing.ImageIcon;
import javax.swing.JLabel;

import com.hk.PlayGame;

public abstract class SuperLabel {
	protected PlayGame pg = PlayGame.getProcess();
	protected JLabel label;
	private String fontName = "LARK";
	private int fontStyle = Font.BOLD;
	private Color fontColor = Color.white;
	
	public SuperLabel() {
		this("");
	}
	protected SuperLabel(String str) {
		label = new JLabel(str);
		label.setOpaque(false);
		label.setBackground(new Color(0, 0, 0));
	}
	protected void BoundsLabel(int x, int y, int w, int h) {
		label.setBounds(x, y, w, h);
	}
	protected void SetLabelIcon(String url) {
		label.setIcon(new ImageIcon(url));
	}
	protected void SetLabelFont(int size) {
		label.setFont(new Font(fontName, fontStyle, size));
		label.setForeground(fontColor);
	}
	public void setLabelText(String str) {
		if (str==null) {
			HideLabel();
		} else {
			this.label.setText(str);
			ShowLabel();
		}
	}
	public abstract JLabel getLabel();
	public abstract void ShowLabel();
	public abstract void HideLabel();
	public abstract void UpdateLabel();
}
